package com.wc.alorithm_luogu.P2437;

import java.math.BigDecimal;
import java.util.Scanner;

/**
 * P2437 蜜蜂路线
 * https://www.luogu.com.cn/problem/P2437
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int start = sc.nextInt();
        int end = sc.nextInt();

        int width = (end + 1) / 2;

        BigDecimal[][] dp = new BigDecimal[2][width];

        int startX = (start - 1) % 2;
        int startY = (start - 1) / 2;



        int endX = (end - 1) % 2;
        int endY = (end - 1) / 2;

        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < width; j++) {
                dp[i][j] = new BigDecimal(0);
            }
        }

        dp[startX][startY] = new BigDecimal(1);
        BigDecimal one = new BigDecimal(1);
        if (startX % 2 == 0) {
            dp[startX + 1][startY] = dp[startX + 1][startY].add(one);
        }

        startY += 1;
        for (int j = startY; j < width; j++) {
            for (int i = 0; i < 2; i++) {
                if (i == 0) {
                    dp[i][j] = dp[i + 1][j - 1].add(dp[i][j - 1]);
                } else {
                    dp[i][j] = dp[i][j - 1].add(dp[i - 1][j]);
                }
            }
        }

        System.out.println(dp[endX][endY]);
    }
}
